Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(infinite-scroll): properly updates scrollTop of ion-content #12599

Closed
wants to merge 91 commits into from
Closed

fix(infinite-scroll): properly updates scrollTop of ion-content #12599

wants to merge 91 commits into from

Conversation

stalniy
Copy link
Contributor

@stalniy stalniy commented Aug 7, 2017

Changes proposed in this pull request:

  • add class property _prevDim which stores dimensions at time of firing ionInfinite event
  • add fix for iOS motion and scrollTop conflict, just disable and reenable motion after some time

Ionic Version: 3.x

Fixes: #11587

brandyscarney and others added 30 commits June 12, 2017 13:51
fixes #9699
fixes #11484
fixes #11389
fixes #11325
fixes #11291
fixes #10828
fixes #11291
fixes #10393
fixes #10257
fixes #9434
fixes #8933
fixes #7178
fixes #7047
fixes #10552
fixes #10393
fixes #10183
fixes #10187
fixes #10852
fixes #11578
When `Tabs` are nested within each other, the highlight can get
misaligned. This prevents that by ensuring the affected
`.tab-highlight` is a direct child of the targeted `Tabs`.
…tabs

* wip

* wip

* progress

* wippy skippy

* getting there

* all tests passing except goBack

* unit tests pass again boi

* goBack tests pass

* great success

* the good stuff
danbucholtz and others added 18 commits July 14, 2017 10:41
restore getActiveNav api
* chore(docs): add anchor links to documentation sub-sections

* chore(docs): make entire section headings clickable as anchors
* wip

* simple-nav, simple-tabs, simple-nav-then-tabs, simple-nested-navs all pass w00t w00t

* updates

* fix tests

* update test
* feat(generators): update templates

* feat(generators): add pipeName to templates
…stroying a nav controller while its transitioning
Also contains a fix for iOS scrolling motion conflict and setting scrollTop

Fixes #11587
@stalniy
Copy link
Contributor Author

stalniy commented Aug 7, 2017

As a temporary solution, I just copy pasted InfiniteScroll class in my project with such configuration:

import { InfiniteScroll as IonicInfiniteScroll } from 'ionic-angular'

@Directive({
  selector: 'my-infinite-scroll',
  providers: [
    { provide: IonicInfiniteScroll, useExisting: forwardRef(() => InfiniteScroll) }
  ]
})
export class InfiniteScroll {

@tobiasmuecksch
Copy link

@brandyscarney Any ETA when this will be integrated to ionic?

@tobiasmuecksch
Copy link

tobiasmuecksch commented Sep 13, 2017

@stalniy I've tried to use your InfiniteScroll class in my project, but it didn't work for me. This is what I did:

  1. Create a file called my-infininite-scroll.ts
  2. Copy your changed file
  3. Correct the import paths
  4. Change the directive settings like you mentioned above
  5. Import the directive in the module of my page with infinite scrolling
  6. use <my-infinite-scroll>instead of <ion-infinite-scroll>

On iOS the lazy loading stopped working completely without any error.
I only see a ~ 200px height empty space on top of my list.

Could you please provide the file you've added to your project? Maybe I did something wrong somewhere...

Ionic 3.6.1
WKWebView

This is my code:
https://gist.github.com/tobiasmuecksch/7c44ae60f860f430dbb58211269bfeb7

@stalniy
Copy link
Contributor Author

stalniy commented Sep 13, 2017

@tobiasmuecksch here is the snippet https://gist.github.com/stalniy/bea9a080387ddaef65d6e04628f744cb Don't forget to import module with your custom infinite scroll

@zjcjoaquin
Copy link

@stalniy I 've tried your snippet and it works most of time.
but sometimes the infinite-scroll would scrollTo the new data 's scrollTop and it would back to the right scrollTop position after a little ms.
this seems your new infinite-scroll could not prevent the scroll-content 's default motion sometimes

@Ionitron
Copy link
Collaborator

Hello and thank you for contributing to Ionic! We have been working on porting all of the Ionic components to web components and have recently updated master to reflect this. This significant change has caused this pull request to break. While we really appreciate the time and effort you put into creating this, we are not able to merge it because of the newly introduced conflicts. We are extremely sorry about this. We will not be merging any more features in to v3. If this is a feature and you have the time, please resubmit this PR against the master branch. If this is a critical security issue in v3, we would greatly appreciate it if you would resubmit the PR against the new v3 branch. Thanks so much for your time!

@Ionitron Ionitron closed this Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.